<!DOCTYPE html>
<html lang="en">
{include file="public/head" /}
<link href="__ADMIN__/vendors/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<!-- bootstrap-daterangepicker -->
<link href="__ADMIN__/vendors/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet">

  <body class="nav-md">
    <div class="container body">
      <div class="main_container">
        <!-- menu -->
        {include file="public/menu" /}
        <!-- menu -->
        <!-- top navigation -->
        {include file="public/top" /}
        <!-- /top navigation -->

        <!-- page content -->
        <div class="right_col" role="main">
          <div class="">
            <div class="page-title">
              <div class="title_left">
                <h3>订单管理</h3>
              </div>
            </div>
            <div class="clearfix"></div>
            <div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12">
                <!--content-->
                <div class="x_panel">
                  <div class="x_title">
                    <h2>查看订单 <small>list order</small></h2>

                    <ul class="nav navbar-right panel_toolbox">
                      
                      <li>
                        <div class="btn-group">
                            {UntilTag:orderstatus class="order-select"/}
                        </div>
                        <label></label>
                      </li>
                      
                      <li>
                        <div id="reportrange_right" class="pull-left" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc">
                          <i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
                          <span>{$time.startTime} - {$time.endTime}</span> <b class="caret"></b>
                        </div>
                      </li>                  
    
                      <li>
                        <button type="button" class="btn btn-success condition_destroy">重置条件</button>
                      </li>

                      <li>
                        <button type="button" class="btn btn-warning data-export">导出数据</button>
                      </li>

                    </ul>

                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content">
                    <br>
                        <div class="table-responsive">
                          <table data-toggle="table" class="table">
                              <thead>
                                  <tr>
                                      <th>ID</th>
                                      <th>订单编号</th>
                                      <th>产品名称</th>
                                      <th>产品图片</th>
                                      <th>客户姓名</th>
                                      <th>客户留言</th>
                                      <th>订单备注</th>
                                      <th>下单员</th>
                                      <th>下单时间</th>
                                      <th>更新时间</th>
                                      <th>状态</th>
                                      <th>预算</th>
                                      <th>定金</th>
                                      <th>操作</th>
                                  </tr>
                              </thead>
                              <tbody>
                                  {volist name="list" id="vo"}
                                  <tr>
                                      <td>{$vo.id}</td>
                                      <td><span>{$vo.order_num}</span></td>
                                      <td><span>{$vo.jewel_name}</span></td>
                                      <td>
                                          <img src="__UPLOADS__/{$vo.pic}" class="img-responsive img-rounded" style="max-width: 150px;max-height: 150px;">
                                      </td>
                                      <td><span>{$vo.user_contact}</span></td>
                                      <td><span>{$vo.user_message}</span></td>
                                      <td><span>{$vo.order_remark}</span></td>
                                      <td><span>{$vo.customer_service}</span></td>
                                      <td><span>{$vo.create_time}</span></td>
                                      <td><span>{$vo.update_time}</span></td>
                                      <td>
                                          {UntilTag:orderstatus id="vo.id" name="vo.status"/}
                                      </td>
                                      <td><span>{$vo.money}</span></td>
                                      <td><span>{$vo.deposit}</span></td>
                                      <td>
                                          <button class="btn btn-success" onclick="window.location.href='{:url('admin/Order/edit','id='.$vo.id)}'">编辑</button>
                                          <button class="btn btn-danger" onclick="order_del({$vo.id})">删除</button>
                                      </td>
                                  </tr>
                                  {/volist}
                              </tbody>
                          </table>
                      </div>

                  </div>
                </div>
                <!--content-->
              </div>
            </div>
          </div>
        </div>
        <!-- /page content -->
        <!-- footer content -->
        {include file="public/footer" /}
        <!-- /footer content -->
      </div>
    </div>
    <!-- script -->
    <!-- jQuery -->
    <script src="__ADMIN__/vendors/jquery/dist/jquery.min.js"></script>
    <!-- Bootstrap -->
    <script src="__ADMIN__/vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <!-- FastClick -->
    <script src="__ADMIN__/vendors/fastclick/lib/fastclick.js"></script>
    <!-- NProgress -->
    <script src="__ADMIN__/vendors/nprogress/nprogress.js"></script>
    <!-- script -->
    <script src="__ADMIN__/vendors/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="__ADMIN__/vendors/layer/layer.min.js"></script>
    <!-- bootstrap-daterangepicker -->
    <script src="__ADMIN__/vendors/moment/min/moment.min.js"></script>
    <script src="__ADMIN__/vendors/bootstrap-daterangepicker/daterangepicker.js"></script>
    <!-- Custom Theme Scripts -->
    <script src="__ADMIN__/build/js/app.js"></script>
    <script src="__ADMIN__/build/js/custom.js"></script>


  </body>
<script type="text/javascript">
    var order_del_url = "{:url('admin/Order/del')}";
    var order_editstatus_url = "{:url('admin/Order/editStatus')}";
    var excel_url = "{:url('admin/Order/excel')}";
    var startTime;
    var endTime;
    var mode = 'list';

    var status;

    $(function(){
      status = getUrlArg('status');
      if (status == '') 
        status = 'all';
      var order_select = $('.order-select').find("option[value="+status+"]").attr("selected",true);
    });
</script>
</html>
